﻿@model Redmine.Core.Entities.User
@{
    ViewBag.Title = "Create";
}
<h2>
    Create</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>User</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.LoginName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LoginName)
            @Html.ValidationMessageFor(model => model.LoginName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.PasswordConfirm)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PasswordConfirm)
            @Html.ValidationMessageFor(model => model.PasswordConfirm)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Mail)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Mail)
            @Html.ValidationMessageFor(model => model.Mail)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.IsAdmin)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsAdmin)
            @Html.ValidationMessageFor(model => model.IsAdmin)
        </div>
        @*        <div class="editor-label">*@ @*            @Html.LabelFor(model => model.LastLoginTime)*@
        @*        </div>*@ @*        <div class="editor-field">*@ @*            @Html.EditorFor(model => model.LastLoginTime)*@
        @*            @Html.ValidationMessageFor(model => model.LastLoginTime)*@ @*        </div>*@
        <div class="editor-label">
            @Html.LabelFor(model => model.Language)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Language, Redmine.Core.Source.DropdownList.LanguageList)
            @Html.ValidationMessageFor(model => model.Language)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.AuthSourceId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AuthSourceId)
            @Html.ValidationMessageFor(model => model.AuthSourceId)
        </div>
        @*        <div class="editor-label">*@ @*            @Html.LabelFor(model => model.CreatedOn)*@
        @*        </div>*@ @*        <div class="editor-field">*@ @*            @Html.EditorFor(model => model.CreatedOn)*@
        @*            @Html.ValidationMessageFor(model => model.CreatedOn)*@ @*        </div>*@
        @**@ @*        <div class="editor-label">*@ @*            @Html.LabelFor(model => model.UpdatedOn)*@
        @*        </div>*@ @*        <div class="editor-field">*@ @*            @Html.EditorFor(model => model.UpdatedOn)*@
        @*            @Html.ValidationMessageFor(model => model.UpdatedOn)*@ @*        </div>*@
        <div class="editor-label">
            @Html.LabelFor(model => model.Type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Type)
            @Html.ValidationMessageFor(model => model.Type)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.IdentityUrl)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IdentityUrl)
            @Html.ValidationMessageFor(model => model.IdentityUrl)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.MailNotification)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MailNotification)
            @Html.ValidationMessageFor(model => model.MailNotification)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Salt)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Salt)
            @Html.ValidationMessageFor(model => model.Salt)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
